home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / manageme / snmp-dev.000 / snmp-dev / view.h < prev   
Encoding:
C/C++ Source or Header  |  1995-07-19  |  1.9 KB  |  85 lines

  1. /*
  2.           viewIndex        INTEGER,                     -- first INDEX
  3.           viewSubtree      OBJECT IDENTIFIER,           -- second INDEX
  4.           viewMask         OCTET STRING
  5.           viewType         INTEGER,
  6.           viewStorageType  StorageType,
  7.           viewStatus       RowStatus,
  8.  */
  9.  
  10. #define VIEWINDEX    1
  11. #define VIEWSUBTREE    2
  12. #define VIEWMASK    3
  13. #define VIEWTYPE    4
  14. #define VIEWSTORAGETYPE    5
  15. #define VIEWSTATUS    6
  16.  
  17. #define VIEWNONEXISTENT        0
  18. #define VIEWACTIVE             1
  19. #define VIEWNOTINSERVICE       2
  20. #define VIEWNOTREADY           3
  21. #define VIEWCREATEANDGO        4
  22. #define VIEWCREATEANDWAIT      5
  23. #define VIEWDESTROY            6
  24.  
  25. #define VIEWINCLUDED    1
  26. #define VIEWEXCLUDED    2
  27.  
  28. struct viewEntry {
  29.     int        viewIndex;
  30.     char    viewName[64];
  31.     int        viewNameLen;
  32.     oid        viewSubtree[32];
  33.     int        viewSubtreeLen;
  34.     u_char    viewMask[32];
  35.     int        viewMaskLen;
  36.     int        viewType;
  37.     int        viewStorageType;
  38.     int        viewStatus;
  39.  
  40.     u_long    viewBitMask;
  41.  
  42.     struct viewEntry *reserved;
  43.     struct viewEntry *next;
  44. };
  45.  
  46. u_char *var_view();
  47. int write_view();
  48.  
  49. struct viewEntry *
  50. view_getEntry(/* int viewIndex */ );
  51. /*
  52.  * Returns a pointer to the viewEntry with the
  53.  * same viewParty and viewSubtree
  54.  * Returns NULL if that entry does not exist.
  55.  */
  56.  
  57. void view_scanInit();
  58. /*
  59.  * Initialized the scan routines so that they will begin at the
  60.  * beginning of the list of viewEntries.
  61.  *
  62.  */
  63.  
  64.  
  65. struct viewEntry *
  66. view_scanNext();
  67. /*
  68.  * Returns a pointer to the next viewEntry.
  69.  * These entries are returned in no particular order,
  70.  * but if N entries exist, N calls to view_scanNext() will
  71.  * return all N entries once.
  72.  * Returns NULL if all entries have been returned.
  73.  * view_scanInit() starts the scan over.
  74.  */
  75.  
  76. struct viewEntry *
  77. view_createEntry(/* int viewIndex */);
  78. /*
  79.  * Creates a viewEntry with the given index
  80.  * and returns a pointer to it.
  81.  * The status of this entry is created as invalid.
  82.  */
  83.  
  84. extern void view_destroyEntry ();
  85.